﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NewRen.Models.ViewModel
{
    public class vAnecdote
    {
        public int ID { get; set; }


        public string Title { get; set; }


        public string Description { get; set; }


        public string Time { get; set; }


        public bool IsPublish { get; set; }



        public int Browses { set; get; }

        public string Sumamry { set; get; }

        public vAnecdote() { }

        public vAnecdote(Anecdote model)
        {
            this.ID = model.ID;
            this.Title = model.Title;
            this.Description = model.Description;
            this.Time = model.Time.ToString();
            this.IsPublish = model.IsPublish;
            this.Browses = model.Browses;
            this.Sumamry = Helpers.String.CleanHTML(Helpers.HtmlFilter.Instance.SanitizeHtml(model.Sumamry));
        }

    }
}
